Important prerequisite

  1. The package doesn't work with the newest version of Jupyter Notebook, run the following commands in your terminal before initiating the Notebook
  2. pip install notebook==5.7.5
  3. pip install tornado==4.5.3

Install dependencies

Don't worry about the error messages during installation, you will be fine.


In [1]:
# uncomment the following line if you haven't installed bte_schema
# !pip install git+https://github.com/kevinxin90/bte_schema#egg=bte_schema

In [2]:
# uncomment the following line if you haven't installed biothings_schema
#pip install git+https://github.com/biothings/biothings_schema.py#egg=biothings_schema.py

In [3]:
# import metadata module from biothings_explorer
from biothings_explorer.metadata import Metadata

In [4]:
# initialize Metadata module
metadata = Metadata()

List all semantic types used in BioThings Explorer


In [5]:
metadata.list_all_semantic_types()


Out[5]:
['Cell',
 'Disease',
 'Transcript',
 'SequenceVariant',
 'DiseaseOrPhenotypicFeature',
 'Protein',
 'CellularComponent',
 'PhenotypicFeature',
 'ChemicalSubstance',
 'BiologicalProcess',
 'Gene',
 'AnatomicalEntity',
 'MolecularActivity',
 'Pathway']

List all identifier types used in BioThings Explorer


In [6]:
metadata.list_all_id_types()


Out[6]:
['bts:entrez',
 'bts:zfin',
 'bts:hp',
 'bts:dbsnp',
 'bts:mesh',
 'bts:rgd',
 'bts:uniprot',
 'bts:mgi',
 'bts:dictybase',
 'bts:chembl',
 'bts:pombase',
 'bts:flybase',
 'bts:reactome',
 'bts:mondo',
 'bts:symbol',
 'bts:sgd',
 'bts:uberon',
 'bts:orphanet',
 'bts:ensembl',
 'bts:wikipathways',
 'bts:snomed',
 'bts:drugbank',
 'bts:hgnc',
 'bts:umls',
 'bts:go',
 'bts:omim',
 'bts:tair']

List all predicates used in BioThings Explorer


In [7]:
metadata.list_all_predicates()


Out[7]:
['bts:enabledBy',
 'bts:transcribedFrom',
 'bts:involvedInPathway',
 'bts:isTranslatedFrom',
 'bts:associatedWith',
 'bts:conditionAssociatedWithVariant',
 'bts:contraindicatedBy',
 'bts:decreasesActivityOf',
 'bts:causedBy',
 'bts:causes',
 'bts:variantAssociatedWithCondition',
 'bts:involvedInBP',
 'bts:contraindication',
 'bts:activityIncreasedBy',
 'bts:target',
 'bts:treats',
 'bts:hasHomolog',
 'bts:molecularlyInteractsWith',
 'bts:pathwayHasParticipants',
 'bts:variantAssociatedWithGene',
 'bts:enablesMF',
 'bts:metabolizedBy',
 'bts:bpHasParticipants',
 'bts:hasGeneProduct',
 'bts:metabolize',
 'bts:treatedBy',
 'bts:targetedBy',
 'bts:geneAssociatedWithVariant',
 'bts:hasTranscript',
 'bts:activityDecreasedBy',
 'bts:increasesActivityOf']

List all associations between semantic types in BioThings Explorer


In [8]:
metadata.list_all_associations()


Out[8]:
[('DiseaseOrPhenotypicFeature',
  'bts:conditionAssociatedWithVariant',
  'SequenceVariant'),
 ('Gene', 'bts:molecularlyInteractsWith', 'BiologicalProcess'),
 ('Gene', 'bts:decreasesActivityOf', 'PhenotypicFeature'),
 ('DiseaseOrPhenotypicFeature', 'bts:associatedWith', 'Disease'),
 ('Cell', 'bts:activityIncreasedBy', 'Gene'),
 ('DiseaseOrPhenotypicFeature', 'bts:treatedBy', 'ChemicalSubstance'),
 ('PhenotypicFeature', 'bts:associatedWith', 'Pathway'),
 ('CellularComponent', 'bts:activityIncreasedBy', 'Gene'),
 ('Gene', 'bts:increasesActivityOf', 'Gene'),
 ('AnatomicalEntity', 'bts:associatedWith', 'Gene'),
 ('PhenotypicFeature', 'bts:associatedWith', 'BiologicalProcess'),
 ('PhenotypicFeature', 'bts:associatedWith', 'AnatomicalEntity'),
 ('AnatomicalEntity', 'bts:associatedWith', 'ChemicalSubstance'),
 ('CellularComponent', 'bts:associatedWith', 'BiologicalProcess'),
 ('DiseaseOrPhenotypicFeature', 'bts:associatedWith', 'ChemicalSubstance'),
 ('Gene', 'bts:targetedBy', 'ChemicalSubstance'),
 ('Gene', 'bts:molecularlyInteractsWith', 'Cell'),
 ('BiologicalProcess', 'bts:associatedWith', 'Gene'),
 ('BiologicalProcess', 'bts:associatedWith', 'AnatomicalEntity'),
 ('DiseaseOrPhenotypicFeature', 'bts:associatedWith', 'AnatomicalEntity'),
 ('BiologicalProcess', 'bts:associatedWith', 'ChemicalSubstance'),
 ('Gene', 'bts:associatedWith', 'CellularComponent'),
 ('DiseaseOrPhenotypicFeature', 'bts:contraindicatedBy', 'ChemicalSubstance'),
 ('Gene', 'bts:decreasesActivityOf', 'CellularComponent'),
 ('ChemicalSubstance', 'bts:treats', 'DiseaseOrPhenotypicFeature'),
 ('PhenotypicFeature', 'bts:associatedWith', 'Gene'),
 ('DiseaseOrPhenotypicFeature', 'bts:associatedWith', 'CellularComponent'),
 ('Gene', 'bts:molecularlyInteractsWith', 'CellularComponent'),
 ('Pathway', 'bts:pathwayHasParticipants', 'Gene'),
 ('PhenotypicFeature', 'bts:associatedWith', 'ChemicalSubstance'),
 ('BiologicalProcess', 'bts:associatedWith', 'PhenotypicFeature'),
 ('Gene', 'bts:decreasesActivityOf', 'BiologicalProcess'),
 ('Gene', 'bts:increasesActivityOf', 'BiologicalProcess'),
 ('PhenotypicFeature', 'bts:associatedWith', 'DiseaseOrPhenotypicFeature'),
 ('AnatomicalEntity', 'bts:associatedWith', 'DiseaseOrPhenotypicFeature'),
 ('CellularComponent', 'bts:associatedWith', 'Gene'),
 ('SequenceVariant', 'bts:associatedWith', 'DiseaseOrPhenotypicFeature'),
 ('BiologicalProcess', 'bts:causedBy', 'ChemicalSubstance'),
 ('Gene', 'bts:involvedInBP', 'BiologicalProcess'),
 ('PhenotypicFeature', 'bts:decreasesActivityOf', 'Cell'),
 ('DiseaseOrPhenotypicFeature', 'bts:associatedWith', 'Gene'),
 ('Gene', 'bts:increasesActivityOf', 'CellularComponent'),
 ('Gene', 'bts:causes', 'DiseaseOrPhenotypicFeature'),
 ('Gene', 'bts:associatedWith', 'PhenotypicFeature'),
 ('ChemicalSubstance', 'bts:target', 'Gene'),
 ('Gene', 'bts:associatedWith', 'BiologicalProcess'),
 ('AnatomicalEntity', 'bts:associatedWith', 'CellularComponent'),
 ('Gene', 'bts:involvedInPathway', 'Pathway'),
 ('Gene', 'bts:hasHomolog', 'Gene'),
 ('Cell', 'bts:associatedWith', 'PhenotypicFeature'),
 ('BiologicalProcess', 'bts:causedBy', 'PhenotypicFeature'),
 ('ChemicalSubstance', 'bts:metabolizedBy', 'Gene'),
 ('Disease', 'bts:associatedWith', 'DiseaseOrPhenotypicFeature'),
 ('DiseaseOrPhenotypicFeature', 'bts:associatedWith', 'Pathway'),
 ('Gene', 'bts:activityIncreasedBy', 'Gene'),
 ('Gene', 'bts:molecularlyInteractsWith', 'ChemicalSubstance'),
 ('Gene', 'bts:associatedWith', 'Gene'),
 ('Gene', 'bts:increasesActivityOf', 'PhenotypicFeature'),
 ('BiologicalProcess', 'bts:causedBy', 'AnatomicalEntity'),
 ('ChemicalSubstance', 'bts:associatedWith', 'PhenotypicFeature'),
 ('Gene', 'bts:geneAssociatedWithVariant', 'SequenceVariant'),
 ('BiologicalProcess', 'bts:associatedWith', 'DiseaseOrPhenotypicFeature'),
 ('PhenotypicFeature', 'bts:activityIncreasedBy', 'Gene'),
 ('ChemicalSubstance', 'bts:molecularlyInteractsWith', 'Gene'),
 ('ChemicalSubstance', 'bts:contraindication', 'DiseaseOrPhenotypicFeature'),
 ('CellularComponent', 'bts:associatedWith', 'PhenotypicFeature'),
 ('Gene', 'bts:enablesMF', 'MolecularActivity'),
 ('ChemicalSubstance', 'bts:associatedWith', 'Gene'),
 ('BiologicalProcess', 'bts:activityDecreasedBy', 'Gene'),
 ('CellularComponent', 'bts:activityDecreasedBy', 'Gene'),
 ('Pathway', 'bts:associatedWith', 'PhenotypicFeature'),
 ('BiologicalProcess', 'bts:associatedWith', 'Cell'),
 ('DiseaseOrPhenotypicFeature', 'bts:associatedWith', 'PhenotypicFeature'),
 ('Cell', 'bts:activityDecreasedBy', 'Gene'),
 ('MolecularActivity', 'bts:enabledBy', 'Gene'),
 ('BiologicalProcess', 'bts:associatedWith', 'CellularComponent'),
 ('PhenotypicFeature', 'bts:decreasesActivityOf', 'CellularComponent'),
 ('BiologicalProcess', 'bts:molecularlyInteractsWith', 'BiologicalProcess'),
 ('Gene', 'bts:associatedWith', 'ChemicalSubstance'),
 ('BiologicalProcess', 'bts:causedBy', 'BiologicalProcess'),
 ('Gene', 'bts:associatedWith', 'DiseaseOrPhenotypicFeature'),
 ('Gene', 'bts:decreasesActivityOf', 'Cell'),
 ('Gene', 'bts:molecularlyInteractsWith', 'Gene'),
 ('PhenotypicFeature', 'bts:associatedWith', 'Cell'),
 ('SequenceVariant',
  'bts:variantAssociatedWithCondition',
  'DiseaseOrPhenotypicFeature'),
 ('Cell', 'bts:associatedWith', 'BiologicalProcess'),
 ('AnatomicalEntity', 'bts:associatedWith', 'PhenotypicFeature'),
 ('Protein', 'bts:isTranslatedFrom', 'Gene'),
 ('DiseaseOrPhenotypicFeature', 'bts:associatedWith', 'BiologicalProcess'),
 ('DiseaseOrPhenotypicFeature', 'bts:associatedWith', 'SequenceVariant'),
 ('AnatomicalEntity', 'bts:associatedWith', 'AnatomicalEntity'),
 ('ChemicalSubstance', 'bts:associatedWith', 'Cell'),
 ('AnatomicalEntity', 'bts:associatedWith', 'BiologicalProcess'),
 ('Gene', 'bts:decreasesActivityOf', 'Gene'),
 ('BiologicalProcess', 'bts:associatedWith', 'BiologicalProcess'),
 ('BiologicalProcess', 'bts:molecularlyInteractsWith', 'Gene'),
 ('BiologicalProcess', 'bts:activityIncreasedBy', 'Gene'),
 ('Gene', 'bts:hasGeneProduct', 'Protein'),
 ('Gene', 'bts:increasesActivityOf', 'AnatomicalEntity'),
 ('AnatomicalEntity', 'bts:causes', 'BiologicalProcess'),
 ('PhenotypicFeature', 'bts:causes', 'BiologicalProcess'),
 ('PhenotypicFeature', 'bts:decreasesActivityOf', 'BiologicalProcess'),
 ('Pathway', 'bts:associatedWith', 'DiseaseOrPhenotypicFeature'),
 ('BiologicalProcess', 'bts:causes', 'BiologicalProcess'),
 ('Gene', 'bts:metabolize', 'ChemicalSubstance'),
 ('ChemicalSubstance', 'bts:associatedWith', 'BiologicalProcess'),
 ('ChemicalSubstance', 'bts:associatedWith', 'AnatomicalEntity'),
 ('Gene', 'bts:increasesActivityOf', 'Cell'),
 ('BiologicalProcess', 'bts:activityDecreasedBy', 'PhenotypicFeature'),
 ('Cell', 'bts:molecularlyInteractsWith', 'Gene'),
 ('ChemicalSubstance', 'bts:associatedWith', 'DiseaseOrPhenotypicFeature'),
 ('ChemicalSubstance', 'bts:associatedWith', 'ChemicalSubstance'),
 ('Transcript', 'bts:transcribedFrom', 'Gene'),
 ('CellularComponent', 'bts:associatedWith', 'DiseaseOrPhenotypicFeature'),
 ('CellularComponent', 'bts:associatedWith', 'AnatomicalEntity'),
 ('PhenotypicFeature', 'bts:associatedWith', 'CellularComponent'),
 ('Cell', 'bts:activityDecreasedBy', 'PhenotypicFeature'),
 ('ChemicalSubstance', 'bts:causes', 'BiologicalProcess'),
 ('Cell', 'bts:associatedWith', 'DiseaseOrPhenotypicFeature'),
 ('PhenotypicFeature', 'bts:activityDecreasedBy', 'Gene'),
 ('CellularComponent', 'bts:molecularlyInteractsWith', 'Gene'),
 ('Cell', 'bts:associatedWith', 'ChemicalSubstance'),
 ('DiseaseOrPhenotypicFeature', 'bts:associatedWith', 'Cell'),
 ('Gene', 'bts:activityDecreasedBy', 'Gene'),
 ('BiologicalProcess', 'bts:bpHasParticipants', 'Gene'),
 ('AnatomicalEntity', 'bts:activityIncreasedBy', 'Gene'),
 ('SequenceVariant', 'bts:variantAssociatedWithGene', 'Gene'),
 ('DiseaseOrPhenotypicFeature', 'bts:causedBy', 'Gene'),
 ('Gene', 'bts:hasTranscript', 'Transcript'),
 ('Gene', 'bts:associatedWith', 'AnatomicalEntity'),
 ('CellularComponent', 'bts:activityDecreasedBy', 'PhenotypicFeature')]

Filter all edges with "Gene" as the subject


In [9]:
metadata.registry.filter_edges(input_cls="Gene")


Out[9]:
[{'label': 'bts:enablesMF',
  'mapping_key': 'bts:enablesMF',
  'api': 'mygene.info',
  'source': 'entrez',
  'input_field': 'entrezgene',
  'input_type': 'Gene',
  'input_id': 'bts:entrez',
  'output_id': 'bts:go',
  'output_type': 'MolecularActivity',
  'output_field': 'go.MF'},
 {'label': 'bts:involvedInBP',
  'mapping_key': 'bts:involvedInBP',
  'api': 'mygene.info',
  'source': 'entrez',
  'input_field': 'entrezgene',
  'input_type': 'Gene',
  'input_id': 'bts:entrez',
  'output_id': 'bts:go',
  'output_type': 'BiologicalProcess',
  'output_field': 'go.BP'},
 {'label': 'bts:involvedInPathway',
  'mapping_key': 'bts:involvedInPathway',
  'api': 'mygene.info',
  'source': 'cpdb',
  'input_field': 'entrezgene',
  'input_type': 'Gene',
  'input_id': 'bts:entrez',
  'output_id': 'bts:wikipathways',
  'output_type': 'Pathway',
  'output_field': 'pathway.wikipathways'},
 {'label': 'bts:involvedInPathway',
  'mapping_key': 'bts:involvedInPathway',
  'api': 'mygene.info',
  'source': 'cpdb',
  'input_field': 'entrezgene',
  'input_type': 'Gene',
  'input_id': 'bts:entrez',
  'output_id': 'bts:reactome',
  'output_type': 'Pathway',
  'output_field': 'pathway.reactome'},
 {'label': 'bts:hasHomolog',
  'mapping_key': 'bts:hasHomolog',
  'api': 'mygene.info',
  'source': 'mygene.info',
  'input_field': 'entrezgene',
  'input_type': 'Gene',
  'input_id': 'bts:entrez',
  'output_id': 'bts:mgi',
  'output_type': 'Gene',
  'output_field': 'pantherdb.ortholog'},
 {'label': 'bts:hasHomolog',
  'mapping_key': 'bts:hasHomolog',
  'api': 'mygene.info',
  'source': 'mygene.info',
  'input_field': 'entrezgene',
  'input_type': 'Gene',
  'input_id': 'bts:entrez',
  'output_id': 'bts:rgd',
  'output_type': 'Gene',
  'output_field': 'pantherdb.ortholog'},
 {'label': 'bts:hasHomolog',
  'mapping_key': 'bts:hasHomolog',
  'api': 'mygene.info',
  'source': 'mygene.info',
  'input_field': 'entrezgene',
  'input_type': 'Gene',
  'input_id': 'bts:entrez',
  'output_id': 'bts:ensembl',
  'output_type': 'Gene',
  'output_field': 'pantherdb.ortholog'},
 {'label': 'bts:hasHomolog',
  'mapping_key': 'bts:hasHomolog',
  'api': 'mygene.info',
  'source': 'mygene.info',
  'input_field': 'entrezgene',
  'input_type': 'Gene',
  'input_id': 'bts:entrez',
  'output_id': 'bts:zfin',
  'output_type': 'Gene',
  'output_field': 'pantherdb.ortholog'},
 {'label': 'bts:hasHomolog',
  'mapping_key': 'bts:hasHomolog',
  'api': 'mygene.info',
  'source': 'mygene.info',
  'input_field': 'entrezgene',
  'input_type': 'Gene',
  'input_id': 'bts:entrez',
  'output_id': 'bts:flybase',
  'output_type': 'Gene',
  'output_field': 'pantherdb.ortholog'},
 {'label': 'bts:hasHomolog',
  'mapping_key': 'bts:hasHomolog',
  'api': 'mygene.info',
  'source': 'mygene.info',
  'input_field': 'entrezgene',
  'input_type': 'Gene',
  'input_id': 'bts:entrez',
  'output_id': 'bts:sgd',
  'output_type': 'Gene',
  'output_field': 'pantherdb.ortholog'},
 {'label': 'bts:hasHomolog',
  'mapping_key': 'bts:hasHomolog',
  'api': 'mygene.info',
  'source': 'mygene.info',
  'input_field': 'entrezgene',
  'input_type': 'Gene',
  'input_id': 'bts:entrez',
  'output_id': 'bts:pombase',
  'output_type': 'Gene',
  'output_field': 'pantherdb.ortholog'},
 {'label': 'bts:hasHomolog',
  'mapping_key': 'bts:hasHomolog',
  'api': 'mygene.info',
  'source': 'mygene.info',
  'input_field': 'entrezgene',
  'input_type': 'Gene',
  'input_id': 'bts:entrez',
  'output_id': 'bts:dictybase',
  'output_type': 'Gene',
  'output_field': 'pantherdb.ortholog'},
 {'label': 'bts:hasHomolog',
  'mapping_key': 'bts:hasHomolog',
  'api': 'mygene.info',
  'source': 'mygene.info',
  'input_field': 'entrezgene',
  'input_type': 'Gene',
  'input_id': 'bts:entrez',
  'output_id': 'bts:tair',
  'output_type': 'Gene',
  'output_field': 'pantherdb.ortholog'},
 {'label': 'bts:hasHomolog',
  'mapping_key': 'bts:hasHomolog',
  'api': 'mygene.info',
  'source': 'mygene.info',
  'input_field': 'entrezgene',
  'input_type': 'Gene',
  'input_id': 'bts:entrez',
  'output_id': 'bts:hgnc',
  'output_type': 'Gene',
  'output_field': 'pantherdb.ortholog'},
 {'label': 'bts:molecularlyInteractsWith',
  'mapping_key': 'bts:molecularlyInteractsWith',
  'api': 'biolink_geneinteraction',
  'source': 'biolink',
  'input_field': 'associations.subject.id',
  'input_type': 'Gene',
  'input_id': 'bts:entrez',
  'output_id': 'bts:hgnc',
  'output_type': 'Gene',
  'output_field': 'associations'},
 {'api': 'myvariant.info',
  'input_field': 'dbsnp.gene.geneid',
  'input_type': 'Gene',
  'source': 'dbsnp',
  'input_id': 'bts:entrez',
  'output_id': 'bts:dbsnp',
  'output_type': 'SequenceVariant',
  'output_field': 'dbsnp.rsid',
  'label': 'bts:geneAssociatedWithVariant',
  'mapping_key': 'bts:dbsnp'},
 {'api': 'mydisease.info',
  'input_field': 'disgenet.genes_related_to_disease.gene_id',
  'input_type': 'Gene',
  'source': 'disgenet',
  'input_id': 'bts:entrez',
  'output_id': 'bts:umls',
  'output_type': 'DiseaseOrPhenotypicFeature',
  'output_field': ['mondo.xrefs.umls', 'disgenet.xrefs.umls'],
  'label': 'bts:associatedWith',
  'mapping_key': 'bts:umls'},
 {'label': 'bts:associatedWith',
  'mapping_key': 'bts:associatedWith',
  'api': 'biolink_gene2anatomy',
  'source': 'biolink',
  'input_field': 'associations.subject.id',
  'input_type': 'Gene',
  'input_id': 'bts:entrez',
  'output_id': 'bts:uberon',
  'output_type': 'AnatomicalEntity',
  'output_field': 'associations'},
 {'label': 'bts:associatedWith',
  'mapping_key': 'bts:associatedWith',
  'api': 'biolink_gene2disease',
  'source': 'biolink',
  'input_field': 'associations.subject.id',
  'input_type': 'Gene',
  'input_id': 'bts:entrez',
  'output_id': 'bts:mondo',
  'output_type': 'DiseaseOrPhenotypicFeature',
  'output_field': 'associations'},
 {'label': 'bts:associatedWith',
  'mapping_key': 'bts:associatedWith',
  'api': 'biolink_gene2phenotype',
  'source': 'biolink',
  'input_field': 'associations.subject.id',
  'input_type': 'Gene',
  'input_id': 'bts:entrez',
  'output_id': 'bts:hp',
  'output_type': 'PhenotypicFeature',
  'output_field': 'associations'},
 {'api': 'mygene.info',
  'input_field': 'pantherdb.ortholog.MGI',
  'input_type': 'Gene',
  'source': 'mygene.info',
  'input_id': 'bts:mgi',
  'output_id': 'bts:entrez',
  'output_type': 'Gene',
  'output_field': 'entrezgene',
  'label': 'bts:hasHomolog',
  'mapping_key': 'bts:entrez'},
 {'api': 'mygene.info',
  'input_field': 'pantherdb.ortholog.RGD',
  'input_type': 'Gene',
  'source': 'mygene.info',
  'input_id': 'bts:rgd',
  'output_id': 'bts:entrez',
  'output_type': 'Gene',
  'output_field': 'entrezgene',
  'label': 'bts:hasHomolog',
  'mapping_key': 'bts:entrez'},
 {'label': 'bts:hasTranscript',
  'mapping_key': 'bts:hasTranscript',
  'api': 'mygene.info',
  'source': 'mygene.info',
  'input_field': 'ensembl.gene',
  'input_type': 'Gene',
  'input_id': 'bts:ensembl',
  'output_id': 'bts:ensembl',
  'output_type': 'Transcript',
  'output_field': 'ensembl'},
 {'label': 'bts:hasGeneProduct',
  'mapping_key': 'bts:hasGeneProduct',
  'api': 'mygene.info',
  'source': 'mygene.info',
  'input_field': 'ensembl.gene',
  'input_type': 'Gene',
  'input_id': 'bts:ensembl',
  'output_id': 'bts:ensembl',
  'output_type': 'Protein',
  'output_field': 'ensembl.protein'},
 {'label': 'bts:hasGeneProduct',
  'mapping_key': 'bts:hasGeneProduct',
  'api': 'mygene.info',
  'source': 'mygene.info',
  'input_field': 'ensembl.gene',
  'input_type': 'Gene',
  'input_id': 'bts:ensembl',
  'output_id': 'bts:uniprot',
  'output_type': 'Protein',
  'output_field': 'uniprot.Swiss-Prot'},
 {'api': 'mygene.info',
  'input_field': 'pantherdb.ortholog.Ensembl',
  'input_type': 'Gene',
  'source': 'mygene.info',
  'input_id': 'bts:ensembl',
  'output_id': 'bts:entrez',
  'output_type': 'Gene',
  'output_field': 'entrezgene',
  'label': 'bts:hasHomolog',
  'mapping_key': 'bts:entrez'},
 {'api': 'mygene.info',
  'input_field': 'pantherdb.ortholog.ZFIN',
  'input_type': 'Gene',
  'source': 'mygene.info',
  'input_id': 'bts:zfin',
  'output_id': 'bts:entrez',
  'output_type': 'Gene',
  'output_field': 'entrezgene',
  'label': 'bts:hasHomolog',
  'mapping_key': 'bts:entrez'},
 {'api': 'mygene.info',
  'input_field': 'pantherdb.ortholog.FlyBase',
  'input_type': 'Gene',
  'source': 'mygene.info',
  'input_id': 'bts:flybase',
  'output_id': 'bts:entrez',
  'output_type': 'Gene',
  'output_field': 'entrezgene',
  'label': 'bts:hasHomolog',
  'mapping_key': 'bts:entrez'},
 {'api': 'mygene.info',
  'input_field': 'pantherdb.ortholog.SGD',
  'input_type': 'Gene',
  'source': 'mygene.info',
  'input_id': 'bts:sgd',
  'output_id': 'bts:entrez',
  'output_type': 'Gene',
  'output_field': 'entrezgene',
  'label': 'bts:hasHomolog',
  'mapping_key': 'bts:entrez'},
 {'api': 'mygene.info',
  'input_field': 'pantherdb.ortholog.PomBase',
  'input_type': 'Gene',
  'source': 'mygene.info',
  'input_id': 'bts:pombase',
  'output_id': 'bts:entrez',
  'output_type': 'Gene',
  'output_field': 'entrezgene',
  'label': 'bts:hasHomolog',
  'mapping_key': 'bts:entrez'},
 {'api': 'mygene.info',
  'input_field': 'pantherdb.ortholog.dictyBase',
  'input_type': 'Gene',
  'source': 'mygene.info',
  'input_id': 'bts:dictybase',
  'output_id': 'bts:entrez',
  'output_type': 'Gene',
  'output_field': 'entrezgene',
  'label': 'bts:hasHomolog',
  'mapping_key': 'bts:entrez'},
 {'api': 'mygene.info',
  'input_field': 'pantherdb.ortholog.TAIR',
  'input_type': 'Gene',
  'source': 'mygene.info',
  'input_id': 'bts:tair',
  'output_id': 'bts:entrez',
  'output_type': 'Gene',
  'output_field': 'entrezgene',
  'label': 'bts:hasHomolog',
  'mapping_key': 'bts:entrez'},
 {'api': 'mygene.info',
  'input_field': 'pantherdb.ortholog.HGNC',
  'input_type': 'Gene',
  'source': 'mygene.info',
  'input_id': 'bts:hgnc',
  'output_id': 'bts:entrez',
  'output_type': 'Gene',
  'output_field': 'entrezgene',
  'label': 'bts:hasHomolog',
  'mapping_key': 'bts:entrez'},
 {'api': 'mychem.info',
  'input_field': 'drugbank.enzymes.gene_name',
  'input_type': 'Gene',
  'source': 'drugbank',
  'input_id': 'bts:symbol',
  'output_id': 'bts:drugbank',
  'output_type': 'ChemicalSubstance',
  'output_field': 'drugbank.id',
  'label': 'bts:metabolize',
  'mapping_key': 'bts:drugbank'},
 {'api': 'mychem.info',
  'input_field': 'drugbank.targets.gene_name',
  'input_type': 'Gene',
  'source': 'drugbank',
  'input_id': 'bts:symbol',
  'output_id': 'bts:drugbank',
  'output_type': 'ChemicalSubstance',
  'output_field': 'drugbank.id',
  'label': 'bts:targetedBy',
  'mapping_key': 'bts:drugbank'},
 {'api': 'mychem.info',
  'input_field': 'drugcentral.bioactivity.uniprot.gene_symbol',
  'input_type': 'Gene',
  'source': 'drugcentral',
  'input_id': 'bts:symbol',
  'output_id': 'bts:chembl',
  'output_type': 'ChemicalSubstance',
  'output_field': 'chembl.molecule_chembl_id',
  'label': 'bts:targetedBy',
  'mapping_key': 'bts:chembl'},
 {'label': 'bts:targetedBy',
  'mapping_key': 'bts:targetedBy',
  'api': 'dgidb_gene2chemical',
  'source': 'dgidb',
  'input_field': 'matchedTerms.geneName',
  'input_type': 'Gene',
  'input_id': 'bts:symbol',
  'output_id': 'bts:chembl',
  'output_type': 'ChemicalSubstance',
  'output_field': 'matchedTerms.interactions'},
 {'api': 'semmeddisease',
  'input_field': 'CAUSES_reverse.gene.umls',
  'input_type': 'Gene',
  'source': 'semmed',
  'input_id': 'bts:umls',
  'output_id': 'bts:umls',
  'output_type': 'DiseaseOrPhenotypicFeature',
  'output_field': 'umls',
  'label': 'bts:causes',
  'mapping_key': 'bts:umls'},
 {'api': 'semmeddisease',
  'input_field': 'AFFECTS.gene.umls',
  'input_type': 'Gene',
  'source': 'semmed',
  'input_id': 'bts:umls',
  'output_id': 'bts:umls',
  'output_type': 'DiseaseOrPhenotypicFeature',
  'output_field': 'umls',
  'label': 'bts:associatedWith',
  'mapping_key': 'bts:umls'},
 {'api': 'semmeddisease',
  'input_field': 'AFFECTS_reverse.gene.umls',
  'input_type': 'Gene',
  'source': 'semmed',
  'input_id': 'bts:umls',
  'output_id': 'bts:umls',
  'output_type': 'DiseaseOrPhenotypicFeature',
  'output_field': 'umls',
  'label': 'bts:associatedWith',
  'mapping_key': 'bts:umls'},
 {'api': 'semmeddisease',
  'input_field': 'AFFECTS.protein.umls',
  'input_type': 'Gene',
  'source': 'semmed',
  'input_id': 'bts:umls',
  'output_id': 'bts:umls',
  'output_type': 'DiseaseOrPhenotypicFeature',
  'output_field': 'umls',
  'label': 'bts:associatedWith',
  'mapping_key': 'bts:umls'},
 {'api': 'semmeddisease',
  'input_field': 'AFFECTS_reverse.protein.umls',
  'input_type': 'Gene',
  'source': 'semmed',
  'input_id': 'bts:umls',
  'output_id': 'bts:umls',
  'output_type': 'DiseaseOrPhenotypicFeature',
  'output_field': 'umls',
  'label': 'bts:associatedWith',
  'mapping_key': 'bts:umls'},
 {'api': 'semmeddisease',
  'input_field': 'ASSOCIATED_WITH.gene.umls',
  'input_type': 'Gene',
  'source': 'semmed',
  'input_id': 'bts:umls',
  'output_id': 'bts:umls',
  'output_type': 'DiseaseOrPhenotypicFeature',
  'output_field': 'umls',
  'label': 'bts:associatedWith',
  'mapping_key': 'bts:umls'},
 {'label': 'bts:molecularlyInteractsWith',
  'mapping_key': 'bts:molecularlyInteractsWith',
  'api': 'semmedgene',
  'source': 'semmed',
  'input_field': 'umls',
  'input_type': 'Gene',
  'input_id': 'bts:umls',
  'output_id': 'bts:umls',
  'output_type': 'ChemicalSubstance',
  'output_field': 'interacts_with.chemical_substance'},
 {'label': 'bts:molecularlyInteractsWith',
  'mapping_key': 'bts:molecularlyInteractsWith',
  'api': 'semmedgene',
  'source': 'semmed',
  'input_field': 'umls',
  'input_type': 'Gene',
  'input_id': 'bts:umls',
  'output_id': 'bts:umls',
  'output_type': 'ChemicalSubstance',
  'output_field': 'interacts_with_reverse.chemical_substance'},
 {'label': 'bts:molecularlyInteractsWith',
  'mapping_key': 'bts:molecularlyInteractsWith',
  'api': 'semmedgene',
  'source': 'semmed',
  'input_field': 'umls',
  'input_type': 'Gene',
  'input_id': 'bts:umls',
  'output_id': 'bts:umls',
  'output_type': 'BiologicalProcess',
  'output_field': 'interacts_with.biological_process_or_activity'},
 {'label': 'bts:molecularlyInteractsWith',
  'mapping_key': 'bts:molecularlyInteractsWith',
  'api': 'semmedgene',
  'source': 'semmed',
  'input_field': 'umls',
  'input_type': 'Gene',
  'input_id': 'bts:umls',
  'output_id': 'bts:umls',
  'output_type': 'BiologicalProcess',
  'output_field': 'interacts_with_reverse.biological_process_or_activity'},
 {'label': 'bts:molecularlyInteractsWith',
  'mapping_key': 'bts:molecularlyInteractsWith',
  'api': 'semmedgene',
  'source': 'semmed',
  'input_field': 'umls',
  'input_type': 'Gene',
  'input_id': 'bts:umls',
  'output_id': 'bts:umls',
  'output_type': 'Cell',
  'output_field': 'interacts_with.cell'},
 {'label': 'bts:molecularlyInteractsWith',
  'mapping_key': 'bts:molecularlyInteractsWith',
  'api': 'semmedgene',
  'source': 'semmed',
  'input_field': 'umls',
  'input_type': 'Gene',
  'input_id': 'bts:umls',
  'output_id': 'bts:umls',
  'output_type': 'Cell',
  'output_field': 'interacts_with_reverse.cell'},
 {'label': 'bts:molecularlyInteractsWith',
  'mapping_key': 'bts:molecularlyInteractsWith',
  'api': 'semmedgene',
  'source': 'semmed',
  'input_field': 'umls',
  'input_type': 'Gene',
  'input_id': 'bts:umls',
  'output_id': 'bts:umls',
  'output_type': 'CellularComponent',
  'output_field': 'interacts_with.cell_component'},
 {'label': 'bts:molecularlyInteractsWith',
  'mapping_key': 'bts:molecularlyInteractsWith',
  'api': 'semmedgene',
  'source': 'semmed',
  'input_field': 'umls',
  'input_type': 'Gene',
  'input_id': 'bts:umls',
  'output_id': 'bts:umls',
  'output_type': 'CellularComponent',
  'output_field': 'interacts_with_reverse.cell_component'},
 {'label': 'bts:molecularlyInteractsWith',
  'mapping_key': 'bts:molecularlyInteractsWith',
  'api': 'semmedgene',
  'source': 'semmed',
  'input_field': 'umls',
  'input_type': 'Gene',
  'input_id': 'bts:umls',
  'output_id': 'bts:umls',
  'output_type': 'Gene',
  'output_field': 'interacts_with.gene'},
 {'api': 'semmedgene',
  'input_field': 'interacts_with.gene.umls',
  'input_type': 'Gene',
  'source': 'semmed',
  'input_id': 'bts:umls',
  'output_id': 'bts:umls',
  'output_type': 'Gene',
  'output_field': 'umls',
  'label': 'bts:molecularlyInteractsWith',
  'mapping_key': 'bts:umls'},
 {'label': 'bts:molecularlyInteractsWith',
  'mapping_key': 'bts:molecularlyInteractsWith',
  'api': 'semmedgene',
  'source': 'semmed',
  'input_field': 'umls',
  'input_type': 'Gene',
  'input_id': 'bts:umls',
  'output_id': 'bts:umls',
  'output_type': 'Gene',
  'output_field': 'interacts_with.protein'},
 {'api': 'semmedgene',
  'input_field': 'interacts_with.protein.umls',
  'input_type': 'Gene',
  'source': 'semmed',
  'input_id': 'bts:umls',
  'output_id': 'bts:umls',
  'output_type': 'Gene',
  'output_field': 'umls',
  'label': 'bts:molecularlyInteractsWith',
  'mapping_key': 'bts:umls'},
 {'label': 'bts:increasesActivityOf',
  'mapping_key': 'bts:increasesActivityOf',
  'api': 'semmedgene',
  'source': 'semmed',
  'input_field': 'umls',
  'input_type': 'Gene',
  'input_id': 'bts:umls',
  'output_id': 'bts:umls',
  'output_type': 'BiologicalProcess',
  'output_field': 'stimulates.biological_process_or_activity'},
 {'label': 'bts:increasesActivityOf',
  'mapping_key': 'bts:increasesActivityOf',
  'api': 'semmedgene',
  'source': 'semmed',
  'input_field': 'umls',
  'input_type': 'Gene',
  'input_id': 'bts:umls',
  'output_id': 'bts:umls',
  'output_type': 'AnatomicalEntity',
  'output_field': 'stimulates.anatomical_entity'},
 {'label': 'bts:increasesActivityOf',
  'mapping_key': 'bts:increasesActivityOf',
  'api': 'semmedgene',
  'source': 'semmed',
  'input_field': 'umls',
  'input_type': 'Gene',
  'input_id': 'bts:umls',
  'output_id': 'bts:umls',
  'output_type': 'Cell',
  'output_field': 'stimulates.cell'},
 {'label': 'bts:increasesActivityOf',
  'mapping_key': 'bts:increasesActivityOf',
  'api': 'semmedgene',
  'source': 'semmed',
  'input_field': 'umls',
  'input_type': 'Gene',
  'input_id': 'bts:umls',
  'output_id': 'bts:umls',
  'output_type': 'CellularComponent',
  'output_field': 'stimulates.cell_component'},
 {'label': 'bts:increasesActivityOf',
  'mapping_key': 'bts:increasesActivityOf',
  'api': 'semmedgene',
  'source': 'semmed',
  'input_field': 'umls',
  'input_type': 'Gene',
  'input_id': 'bts:umls',
  'output_id': 'bts:umls',
  'output_type': 'PhenotypicFeature',
  'output_field': 'stimulates.phenotypic_feature'},
 {'label': 'bts:increasesActivityOf',
  'mapping_key': 'bts:increasesActivityOf',
  'api': 'semmedgene',
  'source': 'semmed',
  'input_field': 'umls',
  'input_type': 'Gene',
  'input_id': 'bts:umls',
  'output_id': 'bts:umls',
  'output_type': 'Gene',
  'output_field': 'stimulates.protein'},
 {'api': 'semmedgene',
  'input_field': 'stimulates.protein.umls',
  'input_type': 'Gene',
  'source': 'semmed',
  'input_id': 'bts:umls',
  'output_id': 'bts:umls',
  'output_type': 'Gene',
  'output_field': 'umls',
  'label': 'bts:activityIncreasedBy',
  'mapping_key': 'bts:umls'},
 {'label': 'bts:decreasesActivityOf',
  'mapping_key': 'bts:decreasesActivityOf',
  'api': 'semmedgene',
  'source': 'semmed',
  'input_field': 'umls',
  'input_type': 'Gene',
  'input_id': 'bts:umls',
  'output_id': 'bts:umls',
  'output_type': 'BiologicalProcess',
  'output_field': 'inhibits.biological_process_or_activity'},
 {'label': 'bts:decreasesActivityOf',
  'mapping_key': 'bts:decreasesActivityOf',
  'api': 'semmedgene',
  'source': 'semmed',
  'input_field': 'umls',
  'input_type': 'Gene',
  'input_id': 'bts:umls',
  'output_id': 'bts:umls',
  'output_type': 'BiologicalProcess',
  'output_field': 'disrupts.biological_process_or_activity'},
 {'label': 'bts:decreasesActivityOf',
  'mapping_key': 'bts:decreasesActivityOf',
  'api': 'semmedgene',
  'source': 'semmed',
  'input_field': 'umls',
  'input_type': 'Gene',
  'input_id': 'bts:umls',
  'output_id': 'bts:umls',
  'output_type': 'Cell',
  'output_field': 'disrupts.cell'},
 {'label': 'bts:decreasesActivityOf',
  'mapping_key': 'bts:decreasesActivityOf',
  'api': 'semmedgene',
  'source': 'semmed',
  'input_field': 'umls',
  'input_type': 'Gene',
  'input_id': 'bts:umls',
  'output_id': 'bts:umls',
  'output_type': 'CellularComponent',
  'output_field': 'inhibits.cell_component'},
 {'label': 'bts:decreasesActivityOf',
  'mapping_key': 'bts:decreasesActivityOf',
  'api': 'semmedgene',
  'source': 'semmed',
  'input_field': 'umls',
  'input_type': 'Gene',
  'input_id': 'bts:umls',
  'output_id': 'bts:umls',
  'output_type': 'CellularComponent',
  'output_field': 'disrupts.cell_component'},
 {'label': 'bts:decreasesActivityOf',
  'mapping_key': 'bts:decreasesActivityOf',
  'api': 'semmedgene',
  'source': 'semmed',
  'input_field': 'umls',
  'input_type': 'Gene',
  'input_id': 'bts:umls',
  'output_id': 'bts:umls',
  'output_type': 'Gene',
  'output_field': 'inhibits.gene'},
 {'api': 'semmedgene',
  'input_field': 'inhibits.gene.umls',
  'input_type': 'Gene',
  'source': 'semmed',
  'input_id': 'bts:umls',
  'output_id': 'bts:umls',
  'output_type': 'Gene',
  'output_field': 'umls',
  'label': 'bts:activityDecreasedBy',
  'mapping_key': 'bts:umls'},
 {'label': 'bts:decreasesActivityOf',
  'mapping_key': 'bts:decreasesActivityOf',
  'api': 'semmedgene',
  'source': 'semmed',
  'input_field': 'umls',
  'input_type': 'Gene',
  'input_id': 'bts:umls',
  'output_id': 'bts:umls',
  'output_type': 'Gene',
  'output_field': 'disrupts.gene'},
 {'api': 'semmedgene',
  'input_field': 'disrupts.gene.umls',
  'input_type': 'Gene',
  'source': 'semmed',
  'input_id': 'bts:umls',
  'output_id': 'bts:umls',
  'output_type': 'Gene',
  'output_field': 'umls',
  'label': 'bts:activityDecreasedBy',
  'mapping_key': 'bts:umls'},
 {'label': 'bts:decreasesActivityOf',
  'mapping_key': 'bts:decreasesActivityOf',
  'api': 'semmedgene',
  'source': 'semmed',
  'input_field': 'umls',
  'input_type': 'Gene',
  'input_id': 'bts:umls',
  'output_id': 'bts:umls',
  'output_type': 'Gene',
  'output_field': 'inhibits.protein'},
 {'api': 'semmedgene',
  'input_field': 'inhibits.protein.umls',
  'input_type': 'Gene',
  'source': 'semmed',
  'input_id': 'bts:umls',
  'output_id': 'bts:umls',
  'output_type': 'Gene',
  'output_field': 'umls',
  'label': 'bts:activityDecreasedBy',
  'mapping_key': 'bts:umls'},
 {'label': 'bts:decreasesActivityOf',
  'mapping_key': 'bts:decreasesActivityOf',
  'api': 'semmedgene',
  'source': 'semmed',
  'input_field': 'umls',
  'input_type': 'Gene',
  'input_id': 'bts:umls',
  'output_id': 'bts:umls',
  'output_type': 'Gene',
  'output_field': 'disrupts.protein'},
 {'api': 'semmedgene',
  'input_field': 'disrupts.protein.umls',
  'input_type': 'Gene',
  'source': 'semmed',
  'input_id': 'bts:umls',
  'output_id': 'bts:umls',
  'output_type': 'Gene',
  'output_field': 'umls',
  'label': 'bts:activityDecreasedBy',
  'mapping_key': 'bts:umls'},
 {'label': 'bts:decreasesActivityOf',
  'mapping_key': 'bts:decreasesActivityOf',
  'api': 'semmedgene',
  'source': 'semmed',
  'input_field': 'umls',
  'input_type': 'Gene',
  'input_id': 'bts:umls',
  'output_id': 'bts:umls',
  'output_type': 'PhenotypicFeature',
  'output_field': 'inhibits.phenotypic_feature'},
 {'label': 'bts:decreasesActivityOf',
  'mapping_key': 'bts:decreasesActivityOf',
  'api': 'semmedgene',
  'source': 'semmed',
  'input_field': 'umls',
  'input_type': 'Gene',
  'input_id': 'bts:umls',
  'output_id': 'bts:umls',
  'output_type': 'PhenotypicFeature',
  'output_field': 'disrupts.phenotypic_feature'},
 {'label': 'bts:associatedWith',
  'mapping_key': 'bts:associatedWith',
  'api': 'semmedgene',
  'source': 'semmed',
  'input_field': 'umls',
  'input_type': 'Gene',
  'input_id': 'bts:umls',
  'output_id': 'bts:umls',
  'output_type': 'AnatomicalEntity',
  'output_field': 'affects.anatomical_entity'},
 {'label': 'bts:associatedWith',
  'mapping_key': 'bts:associatedWith',
  'api': 'semmedgene',
  'source': 'semmed',
  'input_field': 'umls',
  'input_type': 'Gene',
  'input_id': 'bts:umls',
  'output_id': 'bts:umls',
  'output_type': 'AnatomicalEntity',
  'output_field': 'associated_with.anatomical_entity'},
 {'label': 'bts:associatedWith',
  'mapping_key': 'bts:associatedWith',
  'api': 'semmedgene',
  'source': 'semmed',
  'input_field': 'umls',
  'input_type': 'Gene',
  'input_id': 'bts:umls',
  'output_id': 'bts:umls',
  'output_type': 'AnatomicalEntity',
  'output_field': 'associated_with_reverse.anatomical_entity'},
 {'label': 'bts:associatedWith',
  'mapping_key': 'bts:associatedWith',
  'api': 'semmedgene',
  'source': 'semmed',
  'input_field': 'umls',
  'input_type': 'Gene',
  'input_id': 'bts:umls',
  'output_id': 'bts:umls',
  'output_type': 'BiologicalProcess',
  'output_field': 'affects.biological_process_or_activity'},
 {'label': 'bts:associatedWith',
  'mapping_key': 'bts:associatedWith',
  'api': 'semmedgene',
  'source': 'semmed',
  'input_field': 'umls',
  'input_type': 'Gene',
  'input_id': 'bts:umls',
  'output_id': 'bts:umls',
  'output_type': 'BiologicalProcess',
  'output_field': 'associated_with.biological_process_or_activity'},
 {'label': 'bts:associatedWith',
  'mapping_key': 'bts:associatedWith',
  'api': 'semmedgene',
  'source': 'semmed',
  'input_field': 'umls',
  'input_type': 'Gene',
  'input_id': 'bts:umls',
  'output_id': 'bts:umls',
  'output_type': 'BiologicalProcess',
  'output_field': 'associated_with_reverse.biological_process_or_activity'},
 {'label': 'bts:associatedWith',
  'mapping_key': 'bts:associatedWith',
  'api': 'semmedgene',
  'source': 'semmed',
  'input_field': 'umls',
  'input_type': 'Gene',
  'input_id': 'bts:umls',
  'output_id': 'bts:umls',
  'output_type': 'BiologicalProcess',
  'output_field': 'affects_reverse.biological_process_or_activity'},
 {'label': 'bts:associatedWith',
  'mapping_key': 'bts:associatedWith',
  'api': 'semmedgene',
  'source': 'semmed',
  'input_field': 'umls',
  'input_type': 'Gene',
  'input_id': 'bts:umls',
  'output_id': 'bts:umls',
  'output_type': 'CellularComponent',
  'output_field': 'affects.cell_component'},
 {'label': 'bts:associatedWith',
  'mapping_key': 'bts:associatedWith',
  'api': 'semmedgene',
  'source': 'semmed',
  'input_field': 'umls',
  'input_type': 'Gene',
  'input_id': 'bts:umls',
  'output_id': 'bts:umls',
  'output_type': 'CellularComponent',
  'output_field': 'affects_reverse.cell_component'},
 {'label': 'bts:associatedWith',
  'mapping_key': 'bts:associatedWith',
  'api': 'semmedgene',
  'source': 'semmed',
  'input_field': 'umls',
  'input_type': 'Gene',
  'input_id': 'bts:umls',
  'output_id': 'bts:umls',
  'output_type': 'ChemicalSubstance',
  'output_field': 'affects.chemical_substance'},
 {'label': 'bts:associatedWith',
  'mapping_key': 'bts:associatedWith',
  'api': 'semmedgene',
  'source': 'semmed',
  'input_field': 'umls',
  'input_type': 'Gene',
  'input_id': 'bts:umls',
  'output_id': 'bts:umls',
  'output_type': 'ChemicalSubstance',
  'output_field': 'affects_reverse.chemical_substance'},
 {'label': 'bts:associatedWith',
  'mapping_key': 'bts:associatedWith',
  'api': 'semmedgene',
  'source': 'semmed',
  'input_field': 'umls',
  'input_type': 'Gene',
  'input_id': 'bts:umls',
  'output_id': 'bts:umls',
  'output_type': 'ChemicalSubstance',
  'output_field': 'associated_with.chemical_substance'},
 {'label': 'bts:associatedWith',
  'mapping_key': 'bts:associatedWith',
  'api': 'semmedgene',
  'source': 'semmed',
  'input_field': 'umls',
  'input_type': 'Gene',
  'input_id': 'bts:umls',
  'output_id': 'bts:umls',
  'output_type': 'ChemicalSubstance',
  'output_field': 'associated_with_reverse.chemical_substance'},
 {'label': 'bts:associatedWith',
  'mapping_key': 'bts:associatedWith',
  'api': 'semmedgene',
  'source': 'semmed',
  'input_field': 'umls',
  'input_type': 'Gene',
  'input_id': 'bts:umls',
  'output_id': 'bts:umls',
  'output_type': 'Gene',
  'output_field': 'affects.gene'},
 {'api': 'semmedgene',
  'input_field': 'affects.gene.umls',
  'input_type': 'Gene',
  'source': 'semmed',
  'input_id': 'bts:umls',
  'output_id': 'bts:umls',
  'output_type': 'Gene',
  'output_field': 'umls',
  'label': 'bts:associatedWith',
  'mapping_key': 'bts:umls'},
 {'label': 'bts:associatedWith',
  'mapping_key': 'bts:associatedWith',
  'api': 'semmedgene',
  'source': 'semmed',
  'input_field': 'umls',
  'input_type': 'Gene',
  'input_id': 'bts:umls',
  'output_id': 'bts:umls',
  'output_type': 'Gene',
  'output_field': 'affects.protein'},
 {'api': 'semmedgene',
  'input_field': 'affects.protein.umls',
  'input_type': 'Gene',
  'source': 'semmed',
  'input_id': 'bts:umls',
  'output_id': 'bts:umls',
  'output_type': 'Gene',
  'output_field': 'umls',
  'label': 'bts:associatedWith',
  'mapping_key': 'bts:umls'},
 {'label': 'bts:associatedWith',
  'mapping_key': 'bts:associatedWith',
  'api': 'semmedgene',
  'source': 'semmed',
  'input_field': 'umls',
  'input_type': 'Gene',
  'input_id': 'bts:umls',
  'output_id': 'bts:umls',
  'output_type': 'Gene',
  'output_field': 'associated_with.gene'},
 {'api': 'semmedgene',
  'input_field': 'associated_with.gene.umls',
  'input_type': 'Gene',
  'source': 'semmed',
  'input_id': 'bts:umls',
  'output_id': 'bts:umls',
  'output_type': 'Gene',
  'output_field': 'umls',
  'label': 'bts:associatedWith',
  'mapping_key': 'bts:umls'},
 {'label': 'bts:associatedWith',
  'mapping_key': 'bts:associatedWith',
  'api': 'semmedgene',
  'source': 'semmed',
  'input_field': 'umls',
  'input_type': 'Gene',
  'input_id': 'bts:umls',
  'output_id': 'bts:umls',
  'output_type': 'PhenotypicFeature',
  'output_field': 'affects.phenotypic_feature'},
 {'label': 'bts:associatedWith',
  'mapping_key': 'bts:associatedWith',
  'api': 'semmedgene',
  'source': 'semmed',
  'input_field': 'umls',
  'input_type': 'Gene',
  'input_id': 'bts:umls',
  'output_id': 'bts:umls',
  'output_type': 'PhenotypicFeature',
  'output_field': 'associated_with.phenotypic_feature'}]

Filter all edges with "ChemicalSubstance" as the object


In [10]:
metadata.registry.filter_edges(output_cls="ChemicalSubstance")


Out[10]:
[{'api': 'mychem.info',
  'input_field': 'drugbank.enzymes.gene_name',
  'input_type': 'Gene',
  'source': 'drugbank',
  'input_id': 'bts:symbol',
  'output_id': 'bts:drugbank',
  'output_type': 'ChemicalSubstance',
  'output_field': 'drugbank.id',
  'label': 'bts:metabolize',
  'mapping_key': 'bts:drugbank'},
 {'api': 'mychem.info',
  'input_field': 'drugbank.targets.gene_name',
  'input_type': 'Gene',
  'source': 'drugbank',
  'input_id': 'bts:symbol',
  'output_id': 'bts:drugbank',
  'output_type': 'ChemicalSubstance',
  'output_field': 'drugbank.id',
  'label': 'bts:targetedBy',
  'mapping_key': 'bts:drugbank'},
 {'api': 'mychem.info',
  'input_field': 'drugcentral.bioactivity.uniprot.gene_symbol',
  'input_type': 'Gene',
  'source': 'drugcentral',
  'input_id': 'bts:symbol',
  'output_id': 'bts:chembl',
  'output_type': 'ChemicalSubstance',
  'output_field': 'chembl.molecule_chembl_id',
  'label': 'bts:targetedBy',
  'mapping_key': 'bts:chembl'},
 {'label': 'bts:targetedBy',
  'mapping_key': 'bts:targetedBy',
  'api': 'dgidb_gene2chemical',
  'source': 'dgidb',
  'input_field': 'matchedTerms.geneName',
  'input_type': 'Gene',
  'input_id': 'bts:symbol',
  'output_id': 'bts:chembl',
  'output_type': 'ChemicalSubstance',
  'output_field': 'matchedTerms.interactions'},
 {'api': 'mychem.info',
  'input_field': 'drugcentral.drug_use.indication.snomed_concept_id',
  'input_type': 'DiseaseOrPhenotypicFeature',
  'source': 'drugcentral',
  'input_id': 'bts:snomed',
  'output_id': 'bts:chembl',
  'output_type': 'ChemicalSubstance',
  'output_field': 'chembl.molecule_chembl_id',
  'label': 'bts:treatedBy',
  'mapping_key': 'bts:chembl'},
 {'api': 'mychem.info',
  'input_field': 'drugcentral.drug_use.contraindication.snomed_concept_id',
  'input_type': 'DiseaseOrPhenotypicFeature',
  'source': 'drugcentral',
  'input_id': 'bts:snomed',
  'output_id': 'bts:chembl',
  'output_type': 'ChemicalSubstance',
  'output_field': 'chembl.molecule_chembl_id',
  'label': 'bts:contraindicatedBy',
  'mapping_key': 'bts:chembl'},
 {'api': 'mychem.info',
  'input_field': 'drugcentral.drug_use.indication.umls_cui',
  'input_type': 'DiseaseOrPhenotypicFeature',
  'source': 'drugcentral',
  'input_id': 'bts:umls',
  'output_id': 'bts:chembl',
  'output_type': 'ChemicalSubstance',
  'output_field': 'chembl.molecule_chembl_id',
  'label': 'bts:treatedBy',
  'mapping_key': 'bts:chembl'},
 {'api': 'mychem.info',
  'input_field': 'drugcentral.drug_use.contraindication.umls_cui',
  'input_type': 'DiseaseOrPhenotypicFeature',
  'source': 'drugcentral',
  'input_id': 'bts:umls',
  'output_id': 'bts:chembl',
  'output_type': 'ChemicalSubstance',
  'output_field': 'chembl.molecule_chembl_id',
  'label': 'bts:contraindicatedBy',
  'mapping_key': 'bts:chembl'},
 {'label': 'bts:treatedBy',
  'mapping_key': 'bts:treatedBy',
  'api': 'semmeddisease',
  'source': 'semmed',
  'input_field': 'umls',
  'input_type': 'DiseaseOrPhenotypicFeature',
  'input_id': 'bts:umls',
  'output_id': 'bts:umls',
  'output_type': 'ChemicalSubstance',
  'output_field': 'TREATS_reverse.chemical_substance'},
 {'label': 'bts:associatedWith',
  'mapping_key': 'bts:associatedWith',
  'api': 'semmeddisease',
  'source': 'semmed',
  'input_field': 'umls',
  'input_type': 'DiseaseOrPhenotypicFeature',
  'input_id': 'bts:umls',
  'output_id': 'bts:umls',
  'output_type': 'ChemicalSubstance',
  'output_field': 'AFFECTS.chemical_substance'},
 {'label': 'bts:associatedWith',
  'mapping_key': 'bts:associatedWith',
  'api': 'semmeddisease',
  'source': 'semmed',
  'input_field': 'umls',
  'input_type': 'DiseaseOrPhenotypicFeature',
  'input_id': 'bts:umls',
  'output_id': 'bts:umls',
  'output_type': 'ChemicalSubstance',
  'output_field': 'AFFECTS_reverse.chemical_substance'},
 {'label': 'bts:associatedWith',
  'mapping_key': 'bts:associatedWith',
  'api': 'semmeddisease',
  'source': 'semmed',
  'input_field': 'umls',
  'input_type': 'DiseaseOrPhenotypicFeature',
  'input_id': 'bts:umls',
  'output_id': 'bts:umls',
  'output_type': 'ChemicalSubstance',
  'output_field': 'ASSOCIATED_WITH.chemical_substance'},
 {'label': 'bts:associatedWith',
  'mapping_key': 'bts:associatedWith',
  'api': 'semmeddisease',
  'source': 'semmed',
  'input_field': 'umls',
  'input_type': 'DiseaseOrPhenotypicFeature',
  'input_id': 'bts:umls',
  'output_id': 'bts:umls',
  'output_type': 'ChemicalSubstance',
  'output_field': 'ASSOCIATED_WITH_reverse.chemical_substance'},
 {'api': 'semmedchemical',
  'input_field': 'affects.anatomical_entity.umls',
  'input_type': 'AnatomicalEntity',
  'source': 'semmed',
  'input_id': 'bts:umls',
  'output_id': 'bts:umls',
  'output_type': 'ChemicalSubstance',
  'output_field': 'umls',
  'label': 'bts:associatedWith',
  'mapping_key': 'bts:umls'},
 {'api': 'semmedchemical',
  'input_field': 'associated_with.anatomical_entity.umls',
  'input_type': 'AnatomicalEntity',
  'source': 'semmed',
  'input_id': 'bts:umls',
  'output_id': 'bts:umls',
  'output_type': 'ChemicalSubstance',
  'output_field': 'umls',
  'label': 'bts:associatedWith',
  'mapping_key': 'bts:umls'},
 {'api': 'semmedchemical',
  'input_field': 'associated_with_reverse.anatomical_entity.umls',
  'input_type': 'AnatomicalEntity',
  'source': 'semmed',
  'input_id': 'bts:umls',
  'output_id': 'bts:umls',
  'output_type': 'ChemicalSubstance',
  'output_field': 'umls',
  'label': 'bts:associatedWith',
  'mapping_key': 'bts:umls'},
 {'api': 'semmedchemical',
  'input_field': 'affects.biological_process_or_activity.umls',
  'input_type': 'BiologicalProcess',
  'source': 'semmed',
  'input_id': 'bts:umls',
  'output_id': 'bts:umls',
  'output_type': 'ChemicalSubstance',
  'output_field': 'umls',
  'label': 'bts:associatedWith',
  'mapping_key': 'bts:umls'},
 {'api': 'semmedchemical',
  'input_field': 'affects_reverse.biological_process_or_activity.umls',
  'input_type': 'BiologicalProcess',
  'source': 'semmed',
  'input_id': 'bts:umls',
  'output_id': 'bts:umls',
  'output_type': 'ChemicalSubstance',
  'output_field': 'umls',
  'label': 'bts:associatedWith',
  'mapping_key': 'bts:umls'},
 {'api': 'semmedchemical',
  'input_field': 'associated_with.biological_process_or_activity.umls',
  'input_type': 'BiologicalProcess',
  'source': 'semmed',
  'input_id': 'bts:umls',
  'output_id': 'bts:umls',
  'output_type': 'ChemicalSubstance',
  'output_field': 'umls',
  'label': 'bts:associatedWith',
  'mapping_key': 'bts:umls'},
 {'api': 'semmedchemical',
  'input_field': 'associated_with_reverse.biological_process_or_activity.umls',
  'input_type': 'BiologicalProcess',
  'source': 'semmed',
  'input_id': 'bts:umls',
  'output_id': 'bts:umls',
  'output_type': 'ChemicalSubstance',
  'output_field': 'umls',
  'label': 'bts:associatedWith',
  'mapping_key': 'bts:umls'},
 {'api': 'semmedchemical',
  'input_field': 'affects.cell.umls',
  'input_type': 'Cell',
  'source': 'semmed',
  'input_id': 'bts:umls',
  'output_id': 'bts:umls',
  'output_type': 'ChemicalSubstance',
  'output_field': 'umls',
  'label': 'bts:associatedWith',
  'mapping_key': 'bts:umls'},
 {'label': 'bts:associatedWith',
  'mapping_key': 'bts:associatedWith',
  'api': 'semmedchemical',
  'source': 'semmed',
  'input_field': 'umls',
  'input_type': 'ChemicalSubstance',
  'input_id': 'bts:umls',
  'output_id': 'bts:umls',
  'output_type': 'ChemicalSubstance',
  'output_field': 'affects.chemical_substance'},
 {'api': 'semmedchemical',
  'input_field': 'affects.chemical_substance.umls',
  'input_type': 'ChemicalSubstance',
  'source': 'semmed',
  'input_id': 'bts:umls',
  'output_id': 'bts:umls',
  'output_type': 'ChemicalSubstance',
  'output_field': 'umls',
  'label': 'bts:associatedWith',
  'mapping_key': 'bts:umls'},
 {'label': 'bts:associatedWith',
  'mapping_key': 'bts:associatedWith',
  'api': 'semmedchemical',
  'source': 'semmed',
  'input_field': 'umls',
  'input_type': 'ChemicalSubstance',
  'input_id': 'bts:umls',
  'output_id': 'bts:umls',
  'output_type': 'ChemicalSubstance',
  'output_field': 'associated_with.chemical_substance'},
 {'api': 'semmedchemical',
  'input_field': 'associated_with.chemical_substance.umls',
  'input_type': 'ChemicalSubstance',
  'source': 'semmed',
  'input_id': 'bts:umls',
  'output_id': 'bts:umls',
  'output_type': 'ChemicalSubstance',
  'output_field': 'umls',
  'label': 'bts:associatedWith',
  'mapping_key': 'bts:umls'},
 {'api': 'semmedchemical',
  'input_field': 'affects.phenotypic_feature.umls',
  'input_type': 'PhenotypicFeature',
  'source': 'semmed',
  'input_id': 'bts:umls',
  'output_id': 'bts:umls',
  'output_type': 'ChemicalSubstance',
  'output_field': 'umls',
  'label': 'bts:associatedWith',
  'mapping_key': 'bts:umls'},
 {'api': 'semmedchemical',
  'input_field': 'associated_with.phenotypic_feature.umls',
  'input_type': 'PhenotypicFeature',
  'source': 'semmed',
  'input_id': 'bts:umls',
  'output_id': 'bts:umls',
  'output_type': 'ChemicalSubstance',
  'output_field': 'umls',
  'label': 'bts:associatedWith',
  'mapping_key': 'bts:umls'},
 {'api': 'semmedchemical',
  'input_field': 'associated_with_reverse.phenotypic_feature.umls',
  'input_type': 'PhenotypicFeature',
  'source': 'semmed',
  'input_id': 'bts:umls',
  'output_id': 'bts:umls',
  'output_type': 'ChemicalSubstance',
  'output_field': 'umls',
  'label': 'bts:associatedWith',
  'mapping_key': 'bts:umls'},
 {'api': 'semmedchemical',
  'input_field': 'causes.biological_process_or_activity.umls',
  'input_type': 'BiologicalProcess',
  'source': 'semmed',
  'input_id': 'bts:umls',
  'output_id': 'bts:umls',
  'output_type': 'ChemicalSubstance',
  'output_field': 'umls',
  'label': 'bts:causedBy',
  'mapping_key': 'bts:umls'},
 {'label': 'bts:molecularlyInteractsWith',
  'mapping_key': 'bts:molecularlyInteractsWith',
  'api': 'semmedgene',
  'source': 'semmed',
  'input_field': 'umls',
  'input_type': 'Gene',
  'input_id': 'bts:umls',
  'output_id': 'bts:umls',
  'output_type': 'ChemicalSubstance',
  'output_field': 'interacts_with.chemical_substance'},
 {'label': 'bts:molecularlyInteractsWith',
  'mapping_key': 'bts:molecularlyInteractsWith',
  'api': 'semmedgene',
  'source': 'semmed',
  'input_field': 'umls',
  'input_type': 'Gene',
  'input_id': 'bts:umls',
  'output_id': 'bts:umls',
  'output_type': 'ChemicalSubstance',
  'output_field': 'interacts_with_reverse.chemical_substance'},
 {'label': 'bts:associatedWith',
  'mapping_key': 'bts:associatedWith',
  'api': 'semmedgene',
  'source': 'semmed',
  'input_field': 'umls',
  'input_type': 'Gene',
  'input_id': 'bts:umls',
  'output_id': 'bts:umls',
  'output_type': 'ChemicalSubstance',
  'output_field': 'affects.chemical_substance'},
 {'label': 'bts:associatedWith',
  'mapping_key': 'bts:associatedWith',
  'api': 'semmedgene',
  'source': 'semmed',
  'input_field': 'umls',
  'input_type': 'Gene',
  'input_id': 'bts:umls',
  'output_id': 'bts:umls',
  'output_type': 'ChemicalSubstance',
  'output_field': 'affects_reverse.chemical_substance'},
 {'label': 'bts:associatedWith',
  'mapping_key': 'bts:associatedWith',
  'api': 'semmedgene',
  'source': 'semmed',
  'input_field': 'umls',
  'input_type': 'Gene',
  'input_id': 'bts:umls',
  'output_id': 'bts:umls',
  'output_type': 'ChemicalSubstance',
  'output_field': 'associated_with.chemical_substance'},
 {'label': 'bts:associatedWith',
  'mapping_key': 'bts:associatedWith',
  'api': 'semmedgene',
  'source': 'semmed',
  'input_field': 'umls',
  'input_type': 'Gene',
  'input_id': 'bts:umls',
  'output_id': 'bts:umls',
  'output_type': 'ChemicalSubstance',
  'output_field': 'associated_with_reverse.chemical_substance'},
 {'label': 'bts:associatedWith',
  'mapping_key': 'bts:associatedWith',
  'api': 'mydisease.info',
  'source': 'ctd',
  'input_field': ['mondo.xrefs.mesh', 'disgenet.xrefs.mesh'],
  'input_type': 'DiseaseOrPhenotypicFeature',
  'input_id': 'bts:mesh',
  'output_id': 'bts:mesh',
  'output_type': 'ChemicalSubstance',
  'output_field': 'ctd.chemical_related_to_disease'}]

Filter all edges connecting from "Gene" to "ChemicalSubstance"


In [11]:
metadata.registry.filter_edges(input_cls="Gene", output_cls="ChemicalSubstance")


Out[11]:
[{'api': 'mychem.info',
  'input_field': 'drugbank.enzymes.gene_name',
  'input_type': 'Gene',
  'source': 'drugbank',
  'input_id': 'bts:symbol',
  'output_id': 'bts:drugbank',
  'output_type': 'ChemicalSubstance',
  'output_field': 'drugbank.id',
  'label': 'bts:metabolize',
  'mapping_key': 'bts:drugbank'},
 {'api': 'mychem.info',
  'input_field': 'drugbank.targets.gene_name',
  'input_type': 'Gene',
  'source': 'drugbank',
  'input_id': 'bts:symbol',
  'output_id': 'bts:drugbank',
  'output_type': 'ChemicalSubstance',
  'output_field': 'drugbank.id',
  'label': 'bts:targetedBy',
  'mapping_key': 'bts:drugbank'},
 {'api': 'mychem.info',
  'input_field': 'drugcentral.bioactivity.uniprot.gene_symbol',
  'input_type': 'Gene',
  'source': 'drugcentral',
  'input_id': 'bts:symbol',
  'output_id': 'bts:chembl',
  'output_type': 'ChemicalSubstance',
  'output_field': 'chembl.molecule_chembl_id',
  'label': 'bts:targetedBy',
  'mapping_key': 'bts:chembl'},
 {'label': 'bts:targetedBy',
  'mapping_key': 'bts:targetedBy',
  'api': 'dgidb_gene2chemical',
  'source': 'dgidb',
  'input_field': 'matchedTerms.geneName',
  'input_type': 'Gene',
  'input_id': 'bts:symbol',
  'output_id': 'bts:chembl',
  'output_type': 'ChemicalSubstance',
  'output_field': 'matchedTerms.interactions'},
 {'label': 'bts:molecularlyInteractsWith',
  'mapping_key': 'bts:molecularlyInteractsWith',
  'api': 'semmedgene',
  'source': 'semmed',
  'input_field': 'umls',
  'input_type': 'Gene',
  'input_id': 'bts:umls',
  'output_id': 'bts:umls',
  'output_type': 'ChemicalSubstance',
  'output_field': 'interacts_with.chemical_substance'},
 {'label': 'bts:molecularlyInteractsWith',
  'mapping_key': 'bts:molecularlyInteractsWith',
  'api': 'semmedgene',
  'source': 'semmed',
  'input_field': 'umls',
  'input_type': 'Gene',
  'input_id': 'bts:umls',
  'output_id': 'bts:umls',
  'output_type': 'ChemicalSubstance',
  'output_field': 'interacts_with_reverse.chemical_substance'},
 {'label': 'bts:associatedWith',
  'mapping_key': 'bts:associatedWith',
  'api': 'semmedgene',
  'source': 'semmed',
  'input_field': 'umls',
  'input_type': 'Gene',
  'input_id': 'bts:umls',
  'output_id': 'bts:umls',
  'output_type': 'ChemicalSubstance',
  'output_field': 'affects.chemical_substance'},
 {'label': 'bts:associatedWith',
  'mapping_key': 'bts:associatedWith',
  'api': 'semmedgene',
  'source': 'semmed',
  'input_field': 'umls',
  'input_type': 'Gene',
  'input_id': 'bts:umls',
  'output_id': 'bts:umls',
  'output_type': 'ChemicalSubstance',
  'output_field': 'affects_reverse.chemical_substance'},
 {'label': 'bts:associatedWith',
  'mapping_key': 'bts:associatedWith',
  'api': 'semmedgene',
  'source': 'semmed',
  'input_field': 'umls',
  'input_type': 'Gene',
  'input_id': 'bts:umls',
  'output_id': 'bts:umls',
  'output_type': 'ChemicalSubstance',
  'output_field': 'associated_with.chemical_substance'},
 {'label': 'bts:associatedWith',
  'mapping_key': 'bts:associatedWith',
  'api': 'semmedgene',
  'source': 'semmed',
  'input_field': 'umls',
  'input_type': 'Gene',
  'input_id': 'bts:umls',
  'output_id': 'bts:umls',
  'output_type': 'ChemicalSubstance',
  'output_field': 'associated_with_reverse.chemical_substance'}]

Filter all edges representing "Gene" -> "targetedBy" -> "ChemicalSubstance"


In [12]:
metadata.registry.filter_edges(input_cls="Gene", output_cls="ChemicalSubstance", edge_label="bts:targetedBy")


Out[12]:
[{'api': 'mychem.info',
  'input_field': 'drugbank.targets.gene_name',
  'input_type': 'Gene',
  'source': 'drugbank',
  'input_id': 'bts:symbol',
  'output_id': 'bts:drugbank',
  'output_type': 'ChemicalSubstance',
  'output_field': 'drugbank.id',
  'label': 'bts:targetedBy',
  'mapping_key': 'bts:drugbank'},
 {'api': 'mychem.info',
  'input_field': 'drugcentral.bioactivity.uniprot.gene_symbol',
  'input_type': 'Gene',
  'source': 'drugcentral',
  'input_id': 'bts:symbol',
  'output_id': 'bts:chembl',
  'output_type': 'ChemicalSubstance',
  'output_field': 'chembl.molecule_chembl_id',
  'label': 'bts:targetedBy',
  'mapping_key': 'bts:chembl'},
 {'label': 'bts:targetedBy',
  'mapping_key': 'bts:targetedBy',
  'api': 'dgidb_gene2chemical',
  'source': 'dgidb',
  'input_field': 'matchedTerms.geneName',
  'input_type': 'Gene',
  'input_id': 'bts:symbol',
  'output_id': 'bts:chembl',
  'output_type': 'ChemicalSubstance',
  'output_field': 'matchedTerms.interactions'}]